﻿using Abp.AutoMapper;
using System.ComponentModel.DataAnnotations;

namespace FutureApp.Media.Dto
{
    /// <summary>
    /// 创建图片输入参数Dto
    /// </summary>
    [AutoMapTo(typeof(Picture))]
    public class CreatePictureInput
    {
        /// <summary>
        /// 扩展名
        /// </summary>
        [Required]
        [StringLength(Picture.ExtensionMaxLength)]
        public string Extesion { get; set; }

        /// <summary>
        /// 内容类型
        /// </summary>
        [StringLength(Picture.MimeMaxLength)]
        public string Mime { get; set; }

        /// <summary>
        /// 文件路径
        /// </summary>
        [Required]
        [StringLength(Picture.PathMaxLength)]
        public string Path { get; set; }

        /// <summary>
        /// 文件大小
        /// </summary>
        [Required]
        [Range(0, int.MaxValue)]
        public int Size { get; set; }

        /// <summary>
        /// 文件Md5码
        /// </summary>
        [StringLength(Picture.Md5MaxLength)]
        public string Md5 { get; set; }

        /// <summary>
        /// 文件Sha1码
        /// </summary>
        [StringLength(Picture.Sha1MaxLength)]
        public string Sha1 { get; set; }
    }
}
